<?php

namespace app\admin\controller;

use app\admin\services\CityService;
use app\utils\Response;

class CityController extends Common
{

    public function getChildList()
    {
        $cityService = new CityService();
        $data = input('post.');
        $id = (int)$data['id'];
        $list = [];
        if( $id ){
            $list = $cityService->getChildListById($id,['cid as id','title']);
        }
        Response::success([
            'list' => $list
        ]);
    }
}